package com.xx.pmis.persistence.dao;

import org.hibernate.HibernateException;
import org.hibernate.Query;

import com.xx.pmis.model.SocialBudget;

public class SocialBudgetDAOImpl extends BaseHibernateDAOImpl<SocialBudget> implements SocialBudgetDAO {
	public SocialBudget getSocialBudgetByBudgetDate(String budgetDate) {
		SocialBudget socialBudget;
		try {
			Query query = getSession().getNamedQuery("getSocialBudgetByBudgetDateQuery");
			query.setString("budgetDate", budgetDate);
			socialBudget = (SocialBudget) query.uniqueResult();
		} catch (HibernateException ex) {
			throw convertHibernateAccessException(ex);
		}
		return socialBudget;
	}

}
